package ca.usask.cs.drawTree;

import processing.core.PApplet;

public class TheEdge {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6388514668246036186L;
	private DrawControler parent;
	TheNode from;
	TheNode to;
	static final int lineColor = 0xffCC9933;

	TheEdge(DrawControler dp, TheNode ifrom, TheNode ito) {
		parent = dp;
		from = ifrom;
		to = ito;
	}

	void drawEdge() {
		drawline(from.x, from.y, to.x, to.y);
	}

	void drawline(float lx1, float ly1, float lx2, float ly2) {
		parent.fill(lineColor);

		parent.line(lx1, ly1, lx2, ly2);
	}
}